home *** CD-ROM | disk | FTP | other *** search
- object FmAboutBox: TFmAboutBox
- Left = 274
- Top = 158
- BorderStyle = bsDialog
- Caption = 'About'
- ClientHeight = 403
- ClientWidth = 419
- Font.Color = clBlack
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- Position = poScreenCenter
- PixelsPerInch = 96
- TextHeight = 13
- object Panel1: TPanel
- Left = 8
- Top = 8
- Width = 402
- Height = 73
- BevelInner = bvRaised
- BevelOuter = bvLowered
- TabOrder = 0
- object ProgramIcon: TImage
- Left = 8
- Top = 8
- Width = 65
- Height = 57
- Picture.Data = {<image000.bmp>}
- Stretch = True
- IsControl = True
- end
- object ProductName: TLabel
- Left = 88
- Top = 16
- Width = 119
- Height = 13
- Caption = 'Database Errors Example'
- IsControl = True
- end
- object Version: TLabel
- Left = 88
- Top = 40
- Width = 53
- Height = 13
- Caption = 'Version 1.0'
- IsControl = True
- end
- end
- object Panel2: TPanel
- Left = 9
- Top = 88
- Width = 401
- Height = 73
- TabOrder = 1
- object Label2: TLabel
- Left = 22
- Top = 8
- Width = 194
- Height = 13
- Caption = 'Data Model - Referential Integrity'
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object Image1: TImage
- Left = 18
- Top = 24
- Width = 325
- Height = 46
- Picture.Data = {<image001.bmp>}
- end
- end
- object Memo1: TMemo
- Left = 9
- Top = 168
- Width = 401
- Height = 193
- Font.Color = clBlack
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- Lines.Strings = (
- 'This example demonstrates'
- ''
- ' - The use of Data Modules to centralize coding'
- ' - A one-to-many-to-many form'
- ' - Trapping and Controlling Database Errors'
- ''
- '* Creation Order'
- ''
- 'The proper functioning of any form with a one-to-many '
- 'relationship depends on the creation order of TTables and '
- 'TDatasources at runtime. In this example, the MasterSource '
- 'property of the Orders table point to CustomerSource. For the '
- 'one-to-many link to properly synch up, the Customer table must '
- 'be active. The creation order is determined at design'
- 'time by right-clicking on the form and choosing Creation Order.'
- ''
- '* Database Error Trapping'
- ''
- 'Delphi displays errors that arise from user interaction with '
- 'database tables as application level exceptions. The new '
- 'OnPostError, OnEditError and OnDeleteError events of '
- 'the TTable and TQuery objects allow you to trap these '
- 'errors closer to their origin. '
- ''
-
- 'To trigger these errors, run this application, and try to modify' +
- ','
- 'add, or delete records. '
- ''
- 'You may encounter several different database engine'
- 'errors: key violations, missing required fields, referential'
- 'integrity errors, incorrect foreign keys (most notably from '
-
- 'the '#39'parts.db'#39' table, which is not explicitly in this applicatio' +
- 'n), '
- 'and so on. '
- ''
- 'General Notes:'
- ''
- ' The code in this example for the OnDeleteError on the Orders '
-
- ' table allows you to delete the current Orders record even if i' +
- 't '
- ' has dependent details. If this error occurs, a dialog box'
- ' asks you if you want to remove the Orders record and all'
-
- ' of its details. If this is action confirmed, the code deletes' +
- ' all'
- ' of the related Items records and then completes the action'
- ' by retrying the deletion for the current record. '
- ''
- ' The OnPostError, OnEditError and OnDeleteError pass to you'
- ' an exception (e) of the EDatabaseError class. To get '
- ' engine-level errorcodes, you must cast this as an error of'
- ' type EDBEngineError. See the code in DM.PAS for details.'
- ''
- ' The CustNo *Tfield* has min and max values. These are'
- ' NOT database engine-level Min and Max Valchecks and so'
- ' errors that arise from invalid entries are not caught by the '
- ' engine errors trapped for here.')
- ParentFont = False
- ReadOnly = True
- ScrollBars = ssVertical
- TabOrder = 2
- WantReturns = False
- end
- object Button1: TButton
- Left = 173
- Top = 368
- Width = 75
- Height = 25
- Cancel = True
- Caption = 'OK'
- Default = True
- ModalResult = 2
- TabOrder = 3
- end
- end
-